<?php  $this->pageTitle = 'Manage Ticket source'; ?>
<?php

$this->breadcrumbs = array(
	$ticketSource->label(2) => array('index'),
	Yii::t('app', 'Manage Ticket Source'),
);

?>
<div class="main-title">
	<h1 class="float-left"><?php //echo GxHtml::encode($ticketSource->label(2)); ?></h1>
	<div class="controls">
		<a href="<?php echo $this->createUrl('create'); ?>" id="btn-create-ticket-source" class="link-button with-icon">
			<img src="/images/icons/fugue/plus.png" />
			Create <?php echo 'Ticket Source';//GxHtml::encode($ticketSource->label()); ?>
		</a>
	</div>
</div>

<?php $form=$this->beginWidget('CActiveForm', array(
		'enableAjaxValidation'=>true,
	)
); ?>


<div class="flat_area">
	<div class="grid_16" style="border: 1px solid #ccc;">
	<?php $this->widget('PsGridView', array(
		'id' => 'ticket-source-grid',
		'dataProvider' => $ticketSource->search(),
		'filter' => $ticketSource,
		'columns' => array(
			array(
				'id'=>'autoId',
				'class'=>'CCheckBoxColumn',
				'selectableRows' => '10',
				'value' => '$data->primaryKey',
			),
			'id',
			'name',
			//'code',
			array(
				'class' => 'CButtonColumn',
				'header' => 'Actions',
			),
		),
	)); ?>
	<?php echo CHtml::ajaxSubmitButton('Filter',array('/tickets/manageTicketSource/ajaxupdate'), array(),array("style"=>"display:none;")); ?>
	<?php //echo CHtml::ajaxSubmitButton('Activate',array('/tickets/manageTicketSource/ajaxupdate','act'=>'doActive'), array('success'=>'reloadGrid'),array('class'=>'buttonAdd','style'=>' margin-right:20px')); ?>
	<?php //echo CHtml::ajaxSubmitButton('In Activate',array('/tickets/manageTicketSource/ajaxupdate','act'=>'doInactive'), array('success'=>'reloadGrid'),array('class'=>'buttonAdd','style'=>'margin-right:20px')); ?>
	<?php echo CHtml::ajaxSubmitButton('Delete',array('/tickets/manageTicketSource/ajaxupdate','act'=>'doDelete'), array('success'=>'reloadGrid'),array('class'=>'buttonAdd','style'=>' margin-right:20px')); ?>
	
	</div>
</div>



<script>
function reloadGrid(data) {
    $.fn.yiiGridView.update('ticket-source-grid');
}
</script>


<?php //echo CHtml::ajaxSubmitButton('Update sort order',array('/tickets/manageTicketSource/ajaxupdate','act'=>'doSortOrder'), array('success'=>'reloadGrid'),array('class'=>'buttonAdd','style'=>'margin-right:20px')); ?>

<?php $this->endWidget(); ?>